﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Prism.Modularity;
using System.Windows;

namespace RaygunDiplomacy
{
   public class RaygunDiplomacyBootstrapper : UnityBootstrapper
   {
      protected override System.Windows.DependencyObject CreateShell()
      {
         var mainWindow = new MainWindow();
         Application.Current.MainWindow = mainWindow;
         return mainWindow;
      }

      protected override void InitializeShell()
      {
         Application.Current.MainWindow.Show();
      }

      protected override Microsoft.Practices.Prism.Modularity.IModuleCatalog CreateModuleCatalog()
      {
         return  new ModuleCatalog()
            .AddModule(typeof(RaygunDiplomacy.SpritesModule.SpritesModule))
            .AddModule(typeof(RaygunDiplomacy.Model.EntitiesModule.EntitiesModule))
            .AddModule(typeof(RaygunDiplomacy.ControllersModule.ControllersModule), "EntitiesModule");
      }
   }
}
